import { createRouter, createWebHistory } from 'vue-router'
import type { RouteRecordRaw } from 'vue-router'

import Home from '@/views/Home.vue'
import Container from '@/components/container/src/index.vue'

const routes: RouteRecordRaw[] = [
  {
    path: '/',
    component: Container,
    redirect: '/table',
    children: [
      {
        path: '/home',
        component: Home
      },
      {
        path: '/ProductBase/BaseInfo',
        component: () => import('@/views/ProductBase/BaseInfo.vue')
      },
      {
        path: '/chooseArea',
        component: () => import('@/views/ChooseArea/index.vue')
      },
      {
        path: '/form',
        component: () => import('@/views/form/index.vue')
      },
      {
        path: '/table',
        component: () => import('@/views/Table.vue')
      },
    ]
  }
]

const router = createRouter({
  routes,
  history: createWebHistory()
})

export default router
